package com.feature.shop.user.controller;

import java.util.List;

import jakarta.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.feature.core.domain.PageVo;

import com.feature.core.domain.PageVo;
import com.feature.core.domain.Response;
import com.feature.shop.user.api.ShopFileUploadRecordApi;
import com.feature.shop.user.service.ShopFileUploadRecordService;
import com.feature.shop.user.api.request.ShopFileUploadRecordListRequest;
import com.feature.shop.user.api.request.ShopFileUploadRecordPageRequest;
import com.feature.shop.user.api.vo.ShopFileUploadRecordVo;

/***
 * 文件上传记录Controller
 */
@RestController
public class ShopFileUploadRecordController implements ShopFileUploadRecordApi{

    @Autowired
    private ShopFileUploadRecordService shopFileUploadRecordService;

    /**
     * 分页查询
     * 
     * @param request
     * @return
     */
    public Response<PageVo<ShopFileUploadRecordVo>> getFileUploadRecordPageList(@Valid ShopFileUploadRecordPageRequest req) {
        PageVo<ShopFileUploadRecordVo> result = shopFileUploadRecordService.findPageList(req);
        return Response.ok(result);
    }

    /**
     * list查询
     * 
     * @param request
     * @return
     */
    public Response<List<ShopFileUploadRecordVo>> getFileUploadRecordList(@Valid ShopFileUploadRecordListRequest req) {
        return Response.ok(shopFileUploadRecordService.findList(req));
    }

}
